<!DOCTYPE html>
<html>

	<head>
		<meta charset="UTF-8">
		<title>layout页面</title>
		<script type="text/javascript" src="../js/jquery-1.8.3.js"></script>
		<script type="text/javascript" src="../js/easyui/jquery.easyui.min.js"></script>
		<script type="text/javascript" src="../js/easyui/locale/easyui-lang-zh_CN.js"></script>
		<link rel="stylesheet" href="../js/easyui/themes/default/easyui.css" />
		<link rel="stylesheet" href="../js/easyui/themes/icon.css" />
		<script type="text/javascript">
			$(function() {
				$('#dg').datagrid({
					url: 'product.json',
					columns: [
						[{
							field: 'id',
							title: '编号',
							width: 100
						}, {
							field: 'name',
							title: '商品名称',
							width: 100
						}, {
							field: 'price',
							title: '价格',
							width: 100,
							align: 'right'
						}]
					],
					pagination: true,
					toolbar: [{
						id:"savaBun",
						text:"保存",
						iconCls: 'icon-save',
						handler: function() {
							alert('save...')
						}
					}, '-', {
						id:"editBun",
						text:"修改",
						iconCls: 'icon-edit',
						handler: function() {
							alert('edit')
						}
					}]
				});
			});
		</script>
	</head>

	<body>
		<table id="dg"></table>
	</body>

</html>